package myplayer;

import javafx.geometry.HPos;
import javafx.geometry.Insets;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressBarBuilder;
import javafx.scene.layout.FlowPaneBuilder;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.GridPaneBuilder;
import javafx.scene.layout.HBox;
import javafx.scene.layout.HBoxBuilder;
import javafx.scene.layout.VBox;
import javafx.scene.layout.VBoxBuilder;
import javafx.scene.paint.Color;
import javafx.scene.shape.RectangleBuilder;

public class PlayerUi {
	protected final Scene scene;
	final ProgressBar progressBar;

	public PlayerUi() {

		final GridPane gridPane = GridPaneBuilder
				.create()
				.vgap(5)
				.padding(new Insets(0, 0, 0, 0))
				.alignment(Pos.CENTER)
//				.gridLinesVisible(true)
				.build();
		// ====================================================================================
		gridPane.add(RectangleBuilder.create()
							.width(285)
							.height(265)
							.arcWidth(15)
							.arcHeight(15)					
							.fill(Color.SKYBLUE)
							.build(), 0, 0);
		
		gridPane.add(RectangleBuilder.create()
							.width(365)
							.height(265)
							.arcWidth(15)
							.arcHeight(15)					
							.fill(Color.GREENYELLOW)
							.build(), 1, 0);
		
		gridPane.add(FlowPaneBuilder.create()
							.layoutX(10)
							.orientation(Orientation.HORIZONTAL)
							.hgap(10)
							.vgap(10)
							.columnHalignment(HPos.LEFT)
							.children(
									RectangleBuilder.create()
										.width(425)
										.height(65)
										.fill(Color.PERU)
										.build())
							.build(), 0, 2);
		
		progressBar = ProgressBarBuilder.create().id("progressBar").build();
		gridPane.add(progressBar, 0, 4);
		// ====================================================================================
		scene = SceneBuilder
				.create()
				.fill(Color.TRANSPARENT)
				.root(gridPane)
				.build();
	}
}
